From: Georgi Valkov Date: Thu, 12 Jun 2025 05:28:04 +0000 (+0300) Subject: fuse3: fix build warning in fuse_signals.c X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=9ef176aaecbb7cc8ff9f522fe12e8e26c941e000;p=feed%2Fpackages.git fuse3: fix build warning in fuse_signals.c BT_STACK_SZ and backtrace_buffer are not used when HAVE_BACKTRACE is undefined. Wrap them in #ifdef to avoid a build warning: ../lib/fuse_signals.c:31:14: warning: 'backtrace_buffer' defined but not used [-Wunused-variable] 31 | static void *backtrace_buffer[BT_STACK_SZ]; | ^~~~~~~~~~~~~~~~ [1] https://github.com/libfuse/libfuse/pull/1245 Signed-off-by: Georgi Valkov --- diff --git a/utils/fuse3/Makefile b/utils/fuse3/Makefile index d7ee986940..9a518f0888 100644 --- a/utils/fuse3/Makefile +++ b/utils/fuse3/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=fuse3 PKG_VERSION:=3.17.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=fuse-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/fuse-$(PKG_VERSION) diff --git a/utils/fuse3/patches/100-fuse_signals.c-fix-build-warning-when-HAVE_BACKTRACE.patch b/utils/fuse3/patches/100-fuse_signals.c-fix-build-warning-when-HAVE_BACKTRACE.patch new file mode 100644 index 0000000000..0fbc7abcab --- /dev/null +++ b/utils/fuse3/patches/100-fuse_signals.c-fix-build-warning-when-HAVE_BACKTRACE.patch @@ -0,0 +1,31 @@ +From: Georgi Valkov +Date: Thu, 12 Jun 2025 07:36:14 +0300 +Subject: [PATCH] fuse_signals.c: fix build warning when HAVE_BACKTRACE is + undefined + +BT_STACK_SZ and backtrace_buffer are not used when +HAVE_BACKTRACE is undefined. Wrap them in #ifdef +to avoid a build warning: + +../lib/fuse_signals.c:31:14: warning: 'backtrace_buffer' defined but not used [-Wunused-variable] + 31 | static void *backtrace_buffer[BT_STACK_SZ]; + | ^~~~~~~~~~~~~~~~ + +Signed-off-by: Georgi Valkov +--- + lib/fuse_signals.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/lib/fuse_signals.c ++++ b/lib/fuse_signals.c +@@ -27,8 +27,10 @@ static int ignore_sigs[] = { SIGPIPE}; + static int fail_sigs[] = { SIGILL, SIGTRAP, SIGABRT, SIGBUS, SIGFPE, SIGSEGV }; + static struct fuse_session *fuse_instance; + ++#ifdef HAVE_BACKTRACE + #define BT_STACK_SZ (1024 * 1024) + static void *backtrace_buffer[BT_STACK_SZ]; ++#endif + + static void dump_stack(void) + {